using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace VoteSystem.Model.Models.Mapping
{
    public class T_PresentMap : EntityTypeConfiguration<T_Present>
    {
        public T_PresentMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Name)
                .HasMaxLength(200);

            this.Property(t => t.ImgUrl)
                .HasMaxLength(200);

            // Table & Column Mappings
            this.ToTable("T_Present");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Name).HasColumnName("Name");
            this.Property(t => t.ImgUrl).HasColumnName("ImgUrl");
            this.Property(t => t.ThumbUpNum).HasColumnName("ThumbUpNum");
            this.Property(t => t.Price).HasColumnName("Price");
        }
    }
}
